﻿Public Class TemplateCari
    Dim retval As DataGridViewRow
    Public Property ReturnValue() As DataGridViewRow
        Get
            Return retval
        End Get
        Set(ByVal value As DataGridViewRow)
            retval = value
        End Set
    End Property
    Dim vColView As String
    Public Property ColoumnDisplay() As String
        Get
            Return vColView
        End Get
        Set(ByVal value As String)
            vColView = value
        End Set
    End Property
    Dim vTableColoum As String
    Public Property TableKategori() As String
        Get
            Return vTableColoum
        End Get
        Set(ByVal value As String)
            vTableColoum = value
        End Set
    End Property
    Overridable Sub setcombocari()
        
    End Sub
    Overridable Sub searchitem(ByVal finder As String)
        
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Me.Close()
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        setcombocari()
        searchitem("all")
    End Sub

    Private Sub TemplateCari_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        setcombocari()
        searchitem("all")
    End Sub

    Private Sub txtKunci_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtKunci.TextChanged
        If ComCariBy.Text <> "" Then
            searchitem("")
        End If

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        retval = New DataGridViewRow
        Try
            retval = DGVitem.CurrentRow
        Catch ex As Exception

        End Try
        Me.Close()

    End Sub

    Private Sub DGVitem_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles DGVitem.KeyDown
        If e.KeyValue = 13 Then
            Button1_Click(sender, e)
        End If
    End Sub
End Class